home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / graphics.17 / graphics / graphics-0.17 / tek2plot / alabel.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-03-12  |  1.8 KB  |  45 lines

  1. /* Copyright (C) 1989 Free Software Foundation, Inc.
  2.  
  3.    plot is distributed in the hope that it will be useful, but WITHOUT
  4.    ANY WARRANTY.  No author or distributor accepts responsibility to
  5.    anyone for the consequences of using it or for whether it serves any
  6.    particular purpose or works at all, unless he says so in writing.
  7.    Refer to the GNU General Public License for full details.
  8.  
  9.    Everyone is granted permission to copy, modify and redistribute
  10.    plot, but only under the conditions described in the GNU General
  11.    Public License.  A copy of this license is supposed to have been
  12.    given to you along with libtek so you can know your rights and
  13.    responsibilities.  It should be in a file named COPYING.  Among
  14.    other things, the copyright notice and this notice must be preserved
  15.    on all copies.  */
  16.  
  17. #include "sys-defines.h"
  18. #include "libplot.h"
  19.  
  20. /* TEXT_ROTATION is the angle in degress counterclockwise from the
  21.    horizontal for rotation of labels. */
  22.  
  23. int text_rotation=0;
  24.  
  25. /* FONT_SIZE is the font size in printer's points (-f option). */
  26.  
  27. double font_size = 14.;
  28.  
  29. /* ALABEL takes three arguments X_JUSTIFY, Y_JUSTIFY, and S and places
  30.    the label S according to the x and y axis adjustments specified in
  31.    X_JUSTIFY and Y_JUSTIFY respectively.  X_JUSTIFY is a character
  32.    containing either l, c, or r for left, center or right justified with
  33.    respect to the current x coordinate.  Y_JUSTIFY is a character
  34.    containing either b, c, or t for placing the bottom center or top of
  35.    the label even with the current y coordinate. S is a string containing
  36.    the label. The current point is moved to follow the end of the text. */
  37.  
  38. int
  39. alabel (x_justify, y_justify, s)
  40.      char x_justify, y_justify, *s;
  41. {
  42.   fprintf (stdout, "T%c%c%s\n", x_justify, y_justify, s);
  43.   return 0;
  44. }
  45.